build: only compile plug/socket when available
authorChristian Hergert <christian@hergert.me>
Fri, 4 Sep 2015 21:06:22 +0000 (14:06 -0700)
committerIgnacio Casal Quinteiro <icq@gnome.org>
Tue, 22 Sep 2015 10:46:02 +0000 (12:46 +0200)
Plug and Socket require X11 windowing. Often times this is compiled
on systems with both wayland and x11, but not always. Quartz is an
example where it is usually not compiled.

testsuite/gtk/notify.c

index 91492cc1eb65c74ea7255f13bf048dbd4857b057..505c066a04645d12a56e3538584d6175e737f6ee 100644 (file)
@@ -417,11 +417,10 @@ test_type (gconstpointer data)
   /* Backend-specific */
 #ifdef GDK_WINDOWING_X11
   if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) ;
-  else
-#endif
-  if (g_type_is_a (type, GTK_TYPE_PLUG) ||
-      g_type_is_a (type, GTK_TYPE_SOCKET))
+  else if (g_type_is_a (type, GTK_TYPE_PLUG) ||
+           g_type_is_a (type, GTK_TYPE_SOCKET))
     return;
+#endif
 
 #ifdef GDK_WINDOWING_WAYLAND
   if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))